home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 April / MacFormat CD Edition MF36 (April 1996).iso / Shareware City / HyperCard / XCMD Docs / CompileIt! Source Code / GetFactors(num) < prev    next >
Encoding:
Text File  |  1995-08-20  |  179 b   |  8 lines  |  [TEXT/ttxt]

  1. function GetFactors num
  2.   put num*1 into x
  3.   repeat with y=1 to x
  4.     if (x mod y)=0 then put y & "," after list
  5.   end repeat
  6. delete last char of list
  7.   return list
  8. end GetFactors